home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 176-200 / 183 / mklib / t.c < prev    next >
C/C++ Source or Header  |  1995-03-13  |  1KB  |  45 lines

  1. #include <exec/types.h>
  2. #include <stdio.h>
  3. #include <functions.h>
  4. #include "link.h"
  5.  
  6. #define RTC printf("return to continue - ");fflush(stdout);\
  7. getchar();
  8.  
  9. #define DOUBARG 19
  10.  
  11. main()
  12. {
  13.         LONG    retval;
  14.  
  15.         printf("here we go\n");
  16.         libbase = (APTR) OpenLibrary("mylib.library", 0L);
  17.         printf("openlib returns base: %lx\n", libbase);
  18.  
  19.         RTC;
  20.  
  21.         if (libbase)
  22.         {
  23.                 /* test function GetDown()      */
  24.                 retval = GetDown();
  25.                 printf("called getdown, %ld returned\n", retval);
  26.                 RTC;
  27.  
  28.                 /* test function Double()       */
  29.                 printf("double of %d = %ld\n", DOUBARG, Double((LONG)DOUBARG));
  30.                 RTC;
  31.  
  32.                 /* test function Triple()       */
  33.                 printf("Here is three times %d: %ld\n",DOUBARG,
  34.                         Triple((LONG)DOUBARG));
  35.                 RTC;
  36.  
  37.                 printf("Here is 12+13: %ld\n",Add((LONG)12,(LONG)13));
  38.  
  39.                 printf("Here is 1+2+3+4+5+6: %ld\n", Sum ( (LONG)1,
  40.                         (LONG)2, (LONG)3, (LONG)4, (LONG)5, (LONG)6));
  41.  
  42.                 CloseLibrary(libbase);
  43.         }
  44. }
  45.